package com.huilang;

public class te2 {
    public static void main(String[] args) {
        System.out.println(Singleton2.getSingleton2()==Singleton2.getSingleton2());
    }
}

class Singleton2 {
    private Singleton2() {
    }
    private static Singleton2 singleton2;

    public static Singleton2 getSingleton2() {
        if (singleton2 == null) {
            singleton2=new Singleton2();
        }
        return singleton2;
    }
}